<{include file='public/head'}>
<div class="layui-body">
	<div class="layui-tab layui-tab-brief" lay-filter="tab">
	  <ul class="layui-tab-title">
	    <li class="layui-this">栏目修改</li>
	  </ul>
	  <div class="layui-tab-content">
	  	<div class="layui-tab-item layui-show">
	  		<form action="<{:url('/Sorttype/mod/scode/'.$UrlParam.scode.'')}>" method="post" class="layui-form" lay-filter="sort">
	  	     	<input type="hidden" name="formcheck" value="<{$formcheck}>" > 
	  	     	<div class="layui-tab">
				  <ul class="layui-tab-title">
				    <li class="layui-this">基本选项</li>
				    <li>高级选项</li>
				  </ul>
				  <div class="layui-tab-content">
				    <div class="layui-tab-item layui-show">
				    	<div class="layui-form-item">
		                     <label class="layui-form-label">父栏目</label>
		                     <div class="layui-input-block">
		                     	<select name="pcode" id="pcode">
			                        <option value="0">顶级栏目</option>
			                        <{$sort_select}>
			                    </select>
		                     </div>
		                </div>		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">栏目名称  <span class="layui-text-red">*</span></label>
		                     <div class="layui-input-block">
		                     	<input type="text" name="name" required lay-verify="required" value="<{$sort->name}>" placeholder="请输入栏目名称" class="layui-input">
		                     </div>
		                </div>
						<div class="layui-form-item">
		                     <label class="layui-form-label">关联栏目  <span class="layui-text-red">*</span></label>
		                     <div class="layui-input-block">
		                     	<select name="lkcode" id="lkcode">
								<option value="0">默认无</option>
								<{volist name="$lk_list" id="value"}>
								 <option value="<{$value.scode}>" <{if condition="$value.scode eq $sort->lkcode"}>selected<{/if}>><{$value.name}></option>
								 <{/volist}>
			                    </select>
		                     </div>
		                </div>
		                <div class="layui-form-item">
		                     <label class="layui-form-label">URL名称 </label>
		                     <div class="layui-input-block">
		                     	<input type="text" name="filename" value="<{$sort->filename}>" placeholder="请输入URL名称，如:test" class="layui-input">
		                     </div>
		                </div>		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">内容模型  <span class="layui-text-red">*</span></label>
		                     <div class="layui-input-block">
		                     	<select name="mcode" lay-filter="model" lay-verify="required" >
			                     	<option value="">请选择内容模型</option>
									<{volist name="$models" id="value"}>
				                        <option value="<{$value.mcode}>" <{if condition="$value.mcode eq $sort->mcode"}>selected<{/if}> data-type="<{$value.type}>"  data-listtpl="<{$value.listtpl}>" data-contenttpl="<{$value.contenttpl}>" ><{$value.name}></option>
				                    <{/volist}>
			                    </select>
		                     </div>
		                </div>
		                 <input type="hidden" name="type" id="type" value="<{$sort->type}>">
		                 <div class="layui-form-item">
		                     <label class="layui-form-label">列表页模板</label>
		                     <div class="layui-input-block">
			                     <select name="listtpl" id="listtpl">
			                     	<option value="<{$sort->listtpl}>"><{$sort->listtpl}></option>
			                     	<option value="">无</option>
									<{volist name="$tpls" id="value"}>
										<{if condition="$value.listtpl neq $sort->listtpl"}>			                        	
										   <option value="<{$value.listtpl}>"><{$value.listtpl}></option>
										<{/if}>
				                    <{/volist}>
			                     </select>
		                     </div>
		                </div>
		                
		                 <div class="layui-form-item">
		                     <label class="layui-form-label">详情页模板</label>
		                     <div class="layui-input-block">
			                     <select name="contenttpl" id="contenttpl" >
			                     	<option value="<{$sort->contenttpl}>"><{$sort->contenttpl}></option>
			                     	<option value="">无</option>
									<{volist name="$tpls" id="value"}>
										<{if condition="$value.contenttpl neq $sort->contenttpl"}>			                        	
										   <option value="<{$value.contenttpl}>"><{$value.contenttpl}></option>
										<{/if}>
				                    <{/volist}>
			                     </select>
		                     </div>
		                </div>		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">同步子栏目模板</label>
		                     <div class="layui-input-block">
		                     	<input type="radio" name="modsub" value="1" title="是">
								<input type="radio" name="modsub" value="0" title="否" checked>
		                     </div>
		                </div>		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">状态</label>
		                     <div class="layui-input-block">
		                     	<input type="radio" name="status" value="1" title="显示" <{if condition="$sort->status eq 1"}>checked="checked"<{/if}>>
								<input type="radio" name="status" value="0" title="隐藏" <{if condition="$sort->status eq 0"}>checked="checked"<{/if}>>
		                     </div>
		                </div>

		                
				    </div>
				    <div class="layui-tab-item">
				    	<div class="layui-form-item">
		                     <label class="layui-form-label">栏目副名称</label>
		                     <div class="layui-input-block">
		                     	<input type="text" name="subname" value="<{$sort->subname}>" placeholder="请输入栏目副名称" class="layui-input">
		                     </div>
		                </div>
		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">跳转链接</label>
		                     <div class="layui-input-block">
		                     	<input type="text" name="outlink" value="<{$sort->outlink}>" placeholder="请输入跳转链接" class="layui-input">
		                     </div>
		                </div>
						<div class="layui-form-item">
							 <label class="layui-form-label">图标</label>
							 <div class="layui-input-block">
								<input type="text" name="faico" value="<{$sort->faico}>" placeholder="请输入图标名称"  class="layui-input"><a href="http://www.fontawesome.com.cn/faicons/" target="_blank" style="color:red;">[查看图标库]</a>
							 </div>
			             </div>		                
		                 <div class="layui-form-item">						
		                     <label class="layui-form-label">栏目缩略图</label>
		                     <div class="layui-input-inline">
		                     	<input type="text" name="ico" id="ico" value="<{$sort->ico}>" placeholder="请上传栏目缩略图"  class="layui-input">
		                     </div>
		                     <button type="button" class="layui-btn upload" data-des="ico">
							 	 <i class="layui-icon">&#xe67c;</i>上传图片
							 </button>
							 <div id="ico_box" class="pic"><dl><dt><{if condition="$sort->ico"}><img src='<{$sort->ico}>' data-url="<{$sort->ico}>"></dt><dd>删除</dd></dl><{/if}></div>
		                </div>
		                
		                 <div class="layui-form-item">
		                     <label class="layui-form-label">栏目大图</label>
		                     <div class="layui-input-inline">
		                     	<input type="text" name="pic" id="pic" value="<{$sort->pic}>" placeholder="请上传栏目大图"  class="layui-input">
		                     </div>
		                     <button type="button" class="layui-btn upload" data-des="pic">
							 	 <i class="layui-icon">&#xe67c;</i>上传图片
							 </button>
							 <div id="pic_box" class="pic"><dl><dt><{if condition="$sort->pic"}><img src='<{$sort->pic}>' data-url="<{$sort->pic}>"></dt><dd>删除</dd></dl><{/if}></div>
		                </div>
		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">SEO标题</label>
		                     <div class="layui-input-block">
		                     	<input type="text" name="title" value="<{$sort->title}>" placeholder="请输入栏目SEO标题，需前端调用" class="layui-input">
		                     </div>
		                </div>
		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">SEO关键字</label>
		                     <div class="layui-input-block">
		                     	<input type="text" name="keywords" value="<{$sort->keywords}>" placeholder="请输入栏目SEO关键字，需前端调用" class="layui-input">
		                     </div>
		                </div>
		                
		                <div class="layui-form-item">
		                     <label class="layui-form-label">SEO描述</label>
		                     <div class="layui-input-block">
		                     	<textarea name="description" placeholder="请输入栏目SEO描述，需前端调用" class="layui-textarea"><{$sort->description}></textarea>
		                     </div>
		                </div>
				    </div>
				  </div>
				</div>
				<div class="layui-form-item">
					 <div class="layui-input-block">
					    <button class="layui-btn" lay-submit>立即提交</button>
					    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
					    <{:get_btn_back()}>
					 </div>
				</div>
			</form>
	  	</div>
	  </div>
	</div>


</div>
<{include file='public/foot'}>
